<template>
  <div class="outer">
    <h1>上映电影展示</h1>
    <button @click="getMovieList">获取电影列表</button>
    <ul>
      <li v-for="movie in movieList" :key="movie.tvId">
        {{ movie.albumName }}
      </li>
    </ul>
  </div>
</template>

<script>
import { mapActions, mapState } from "vuex";
export default {
  name: "List",
  computed: {
    ...mapState(["movieList"]),
  },
  // mounted() {
  //   console.log(mapActions(["getMovieList"]));
  // },
  methods: {
    ...mapActions(["getMovieList"]),
  },
};
</script>

<style scoped>
.outer {
  text-align: center;
  background-color: rgb(133, 228, 61);
}
</style>